﻿@using PagedList.Mvc;
@using PagedList;
@model PagedList.IPagedList<WineStore.Models.Sim>
@{
    ViewBag.Title = "SearchByNumber";
    Layout = "~/Views/Shared/HomeLayout.cshtml";
}

<!--Sử dụng chung-->
<script src="../../Scripts/jquery-1.5.1.min.js"></script>
<!--Sử dụng cho autocomplete-->
<script src="../../Scripts/jquery-ui-1.8.11.min.js" type="text/javascript"></script>

<!--Sử dụng cho autocomplete-->
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $('*[data-autocomplete-url]')
    .each(function () {
        $(this).autocomplete({
            source: $(this).data("autocomplete-url")
        });
    });
    });
</script>


<!--Sử dụng cho autocomplete-->
<link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<link href="../../Content/styletablesim.css" rel="stylesheet" />
<!--Sử dụng cho paging-->
<link href="../../Content/PagedList.css" rel="stylesheet" type="text/css" />

<link href="../../Content/styleorderform.css" rel="stylesheet" />

@{Html.RenderAction("PartialSearchByNumber", "PartialView");}
<div style="clear: both;"></div>

<div id="content" style="margin-top: 10px;">

    <table cellspacing="0">
        <tr>
            <th>Mã Số</th>
            <th>Sim</th>
            <th>Giá</th>
            <th>Mạng</th>
            <th>Nhóm</th>
            <th>Đặt Mua</th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.SimId</td>
                <td><a class="simnumber" href="../../Home/Order?id=@item.SimId">@item.SimNumber</a></td>
                <td style="color: #CC0000; font-weight: bold;">@item.SimPrice đ</td>
                <td>
                    <img src="../../Content/Images/Supplier/@item.Supplier.SupplierImage" width="70" height="21"/></td>
                <td style="color: #006666; font-weight: bold;">@item.CategorySim.CategorySimName</td>
                <td><a class="edit" href="../../Home/Order?id=@item.SimId">Đặt Mua</a></td>
            </tr>
        }

        <tr style="height: 25px;">
            <td colspan="10" style="padding: 0px;">
                <div style="position: relative; top: -10px; left: -30px;">
                    @Html.PagedListPager(Model, page => Url.Action("SearchByNumber", new { page = page, currentSearchIndex = ViewBag.currentSearchIndex }), (PagedListRenderOptions)ViewBag.Pro)
                </div>
            </td>
        </tr>
    </table>
</div>

